package com.crazyhat.crazyhat.pojo;

import java.time.LocalDateTime;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.crazyhat.crazyhat.anno.SensitiveWordAnno;
import com.crazyhat.crazyhat.vaildation.ValidationGroup.InsertValidAtionGroup;
import com.crazyhat.crazyhat.vaildation.ValidationGroup.UpdateValidAtionGroup;
import com.fasterxml.jackson.annotation.JsonFormat;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 社团活动发布实体，支持多文件上传
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ActivityPublish {

    /**
     * 活动ID
     */
    @NotNull(groups = UpdateValidAtionGroup.class)
    private Integer activityId;

    /**
     * 社团ID
     */
    @NotNull(groups = InsertValidAtionGroup.class)
    private Integer clubId;

    /**
     * 活动名称
     */
    @SensitiveWordAnno
    @Size(max = 30)
    @NotEmpty
    private String activityName;

    /**
     * 结束时间
     */
    //@NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 活动介绍
     */
    @NotNull
    @SensitiveWordAnno
    private String content;

    /**
     * 文件列表
     */
    private List<MultipartFile> fileList;
}
